﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace SPFarmDiscovery.SPObjects
{
	public class Web: SPObjectBase
	{
		public string Url;
		public string Title;
		public double SizeInMB;
		public double TotalSizeInMB;
		public int NumberOfSubWebs;
		public int TotalNumberOfSubWebs;
		public int NumberOfLists;
		public int TotalNumberOfLists;
		public List<Web> SubWebs;

		public Web() { }

		public Web(
			string url, string title,
			double sizeInMB, double totalSize,
			int numberOfSubWebs, int totalNumberOfSubWebs,
			int numberOfLists, int totalNumberOfLists,
			List<Web> subWebs)
		{
			this.Url = url;
			this.Title = title;

			this.SizeInMB = sizeInMB;
			this.TotalSizeInMB = totalSize;

			this.NumberOfSubWebs = numberOfSubWebs;
			this.TotalNumberOfSubWebs = totalNumberOfSubWebs;

			this.NumberOfLists = numberOfLists;
			this.TotalNumberOfLists = totalNumberOfLists;

			this.SubWebs = subWebs;
		}

		public override string ToString()
		{
			return this.ToXml();
		}
	}
}
